home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / SoundAndMusic / cmix / lib / allpass.c next >
C/C++ Source or Header  |  1989-07-13  |  259b  |  15 lines

  1.  
  2. #include "../H/combs.h"
  3.  
  4. float allpass(samp,a)
  5. float samp,*a;
  6. {
  7.     float temp,*aptr;
  8.     if ( a[STARTM1] >= (int) a[0]) a[STARTM1] = START;
  9.     aptr = a + (int)a[STARTM1];
  10.     a[STARTM1] ++; 
  11.     temp = *aptr;
  12.     *aptr = *aptr * a[1] + samp;
  13.     return(temp - a[1] * *aptr);
  14. }
  15.